# ### 加入购物车
#
# 请求网址:http://192.168.11.130:8080/wx/cart/add
# 请求方法:POST
# 请求头：
# Content-Type: application/json;charset=utf-8
# X-Litemall-Token:TOKEN
# 请求体：
# {"goodsId":1181000,"number":1,"productId":2}
#导包
import requests
#创建接口类
class Lite_Cart:
    #初始化数据
    def __init__(self):
        self.url_cart="http://192.168.11.132:8080/wx/cart/add"
    def cart_add(self,login_token,json_cart):
        return requests.post(url=self.url_cart,headers={"X-Litemall-Token":login_token},json=json_cart)